/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package damei;

import java.awt.event.MouseEvent;
import java.io.File;
import java.sql.*;
import java.util.Calendar;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;

/**
 *
 * @author Administrator
 */
public class Main extends javax.swing.JFrame {

    private static String driver;
    private static String url;
    private static String password;
    private static String user;
    private String as;
    private int editselect = 0;
    private int addselect = 0;
    private String ssex;
    private String sname;
    private String sqq;
    private String scphone;
    private String szr;
    private String szx;
    private String sno;
    private String spp;
    private String sxh;
    private String sjz;
    private DefaultTableModel dtm;
    private DefaultTableModel tableModel;

    /**
     * Creates new form NewJFrame
     */
    public Main() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        userButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        hyjf = new javax.swing.JButton();
        ywbl = new javax.swing.JButton();
        fzxx = new javax.swing.JButton();
        jLayeredPane2 = new javax.swing.JLayeredPane();
        main = new javax.swing.JPanel();
        jButton4 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        users = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel8 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jname = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jphone = new javax.swing.JTextField();
        qq = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jcphone = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jsfz = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jwork = new javax.swing.JTextField();
        jjg = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jzr = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jmz = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jwb = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jwaddr = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jother = new javax.swing.JTextArea();
        jsex = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        jaddr = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jbd = new javax.swing.JTextField();
        jyb = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jemail = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jzx = new javax.swing.JTextField();
        jLabel31 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jzsh = new javax.swing.JTextField();
        canvas1 = new java.awt.Canvas();
        jLabel32 = new javax.swing.JLabel();
        jyjr = new javax.swing.JTextField();
        jLabel33 = new javax.swing.JLabel();
        jyjp = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        jyjd = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        jjbr = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jjbrq = new javax.swing.JTextField();
        jhy = new javax.swing.JComboBox();
        jPanel3 = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        brand = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        cartype = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jszh = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        gcrq = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        dw = new javax.swing.JComboBox();
        jLabel29 = new javax.swing.JLabel();
        lzrq = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        cphm = new javax.swing.JTextField();
        pl = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        jl = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        xsz = new javax.swing.JTextField();
        jLabel39 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        tbgs = new javax.swing.JTextField();
        jLabel49 = new javax.swing.JLabel();
        tbrq = new javax.swing.JTextField();
        editbutton = new javax.swing.JButton();
        savebutton = new javax.swing.JButton();
        exit_edit = new javax.swing.JButton();
        jf = new javax.swing.JPanel();
        jLabel43 = new javax.swing.JLabel();
        yw = new javax.swing.JPanel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jCheckBox3 = new javax.swing.JCheckBox();
        jCheckBox4 = new javax.swing.JCheckBox();
        jCheckBox5 = new javax.swing.JCheckBox();
        jCheckBox6 = new javax.swing.JCheckBox();
        jCheckBox7 = new javax.swing.JCheckBox();
        jCheckBox8 = new javax.swing.JCheckBox();
        jCheckBox9 = new javax.swing.JCheckBox();
        jCheckBox10 = new javax.swing.JCheckBox();
        jCheckBox11 = new javax.swing.JCheckBox();
        jCheckBox12 = new javax.swing.JCheckBox();
        jCheckBox13 = new javax.swing.JCheckBox();
        jCheckBox14 = new javax.swing.JCheckBox();
        jCheckBox15 = new javax.swing.JCheckBox();
        jCheckBox16 = new javax.swing.JCheckBox();
        jCheckBox17 = new javax.swing.JCheckBox();
        jCheckBox18 = new javax.swing.JCheckBox();
        jCheckBox19 = new javax.swing.JCheckBox();
        jCheckBox20 = new javax.swing.JCheckBox();
        jCheckBox21 = new javax.swing.JCheckBox();
        jCheckBox22 = new javax.swing.JCheckBox();
        jCheckBox23 = new javax.swing.JCheckBox();
        jCheckBox24 = new javax.swing.JCheckBox();
        jCheckBox25 = new javax.swing.JCheckBox();
        jCheckBox26 = new javax.swing.JCheckBox();
        jCheckBox27 = new javax.swing.JCheckBox();
        jCheckBox28 = new javax.swing.JCheckBox();
        jCheckBox29 = new javax.swing.JCheckBox();
        jCheckBox30 = new javax.swing.JCheckBox();
        jCheckBox31 = new javax.swing.JCheckBox();
        jCheckBox32 = new javax.swing.JCheckBox();
        jCheckBox33 = new javax.swing.JCheckBox();
        jCheckBox34 = new javax.swing.JCheckBox();
        jCheckBox35 = new javax.swing.JCheckBox();
        jCheckBox36 = new javax.swing.JCheckBox();
        jCheckBox37 = new javax.swing.JCheckBox();
        jCheckBox39 = new javax.swing.JCheckBox();
        jCheckBox40 = new javax.swing.JCheckBox();
        jCheckBox43 = new javax.swing.JCheckBox();
        jCheckBox44 = new javax.swing.JCheckBox();
        jCheckBox45 = new javax.swing.JCheckBox();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel41 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel42 = new javax.swing.JLabel();
        jSeparator4 = new javax.swing.JSeparator();
        jLabel44 = new javax.swing.JLabel();
        jSeparator5 = new javax.swing.JSeparator();
        jLabel45 = new javax.swing.JLabel();
        jCheckBox38 = new javax.swing.JCheckBox();
        jCheckBox41 = new javax.swing.JCheckBox();
        jCheckBox42 = new javax.swing.JCheckBox();
        other = new javax.swing.JPanel();
        jscroll = new javax.swing.JScrollPane();
        tables = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jno = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        jmt = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jdata = new javax.swing.JTextField();
        daochu = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("会员系统");
        setLocationByPlatform(true);
        setResizable(false);

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        userButton.setText("会员资料");
        userButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                userButtonActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("管理系统");

        hyjf.setText("会员积分");
        hyjf.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                hyjfActionPerformed(evt);
            }
        });

        ywbl.setText("业务管理");
        ywbl.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ywblActionPerformed(evt);
            }
        });

        fzxx.setText("会员信息");
        fzxx.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fzxxActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(userButton, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
                    .addComponent(hyjf, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(ywbl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(fzxx, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(13, 13, 13))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
                .addGap(27, 27, 27)
                .addComponent(userButton)
                .addGap(18, 18, 18)
                .addComponent(hyjf)
                .addGap(18, 18, 18)
                .addComponent(ywbl)
                .addGap(18, 18, 18)
                .addComponent(fzxx)
                .addGap(175, 175, 175))
        );

        jButton4.setText("新增");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jButton3.setText("查询");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout mainLayout = new javax.swing.GroupLayout(main);
        main.setLayout(mainLayout);
        mainLayout.setHorizontalGroup(
            mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainLayout.createSequentialGroup()
                .addGap(99, 99, 99)
                .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(68, 68, 68)
                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(116, Short.MAX_VALUE))
        );
        mainLayout.setVerticalGroup(
            mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainLayout.createSequentialGroup()
                .addGap(96, 96, 96)
                .addGroup(mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(246, Short.MAX_VALUE))
        );

        main.setBounds(0, 60, 690, 430);
        jLayeredPane2.add(main, javax.swing.JLayeredPane.DEFAULT_LAYER);

        users.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jPanel8.setPreferredSize(new java.awt.Dimension(666, 344));

        jLabel4.setText("姓 名");

        jname.setEnabled(false);
        jname.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jnameActionPerformed(evt);
            }
        });

        jLabel6.setText("性 别");

        jLabel8.setText("固定电话");

        jLabel9.setText("婚姻状况");

        jphone.setEnabled(false);
        jphone.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jphoneActionPerformed(evt);
            }
        });

        qq.setEnabled(false);
        qq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                qqActionPerformed(evt);
            }
        });

        jLabel2.setText("手机号码");

        jcphone.setEnabled(false);
        jcphone.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcphoneActionPerformed(evt);
            }
        });

        jLabel10.setText("民 族");

        jLabel11.setText("身份证");

        jsfz.setEnabled(false);

        jLabel12.setText("工作单位");

        jwork.setEnabled(false);
        jwork.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jworkActionPerformed(evt);
            }
        });

        jjg.setEnabled(false);

        jLabel14.setText("中燃加油卡号");

        jzr.setEnabled(false);
        jzr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jzrActionPerformed(evt);
            }
        });

        jLabel15.setText(" Q Q ");

        jmz.setEnabled(false);

        jLabel16.setText("微薄");

        jwb.setEnabled(false);
        jwb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jwbActionPerformed(evt);
            }
        });

        jLabel17.setText("单位地址");

        jwaddr.setEnabled(false);
        jwaddr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jwaddrActionPerformed(evt);
            }
        });

        jLabel19.setText("备 注");

        jScrollPane1.setEnabled(false);

        jother.setColumns(20);
        jother.setRows(3);
        jother.setAutoscrolls(false);
        jother.setEnabled(false);
        jScrollPane1.setViewportView(jother);

        jsex.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "男", "女"}));
        jsex.setEnabled(false);
        jsex.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jsexActionPerformed(evt);
            }
        });

        jLabel3.setText("家庭住址");

        jaddr.setEnabled(false);

        jLabel20.setText("出生日期");

        jLabel21.setText("邮编");

        jbd.setEnabled(false);
        jbd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbdActionPerformed(evt);
            }
        });

        jyb.setEnabled(false);

        jLabel5.setText("邮 箱");

        jemail.setEnabled(false);

        jLabel18.setText("中信银行车主卡");

        jzx.setEnabled(false);

        jLabel31.setText("籍贯");

        jLabel13.setText("中石化加油卡号");

        jzsh.setEnabled(false);
        jzsh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jzshActionPerformed(evt);
            }
        });

        jLabel32.setText("应急联系人");

        jyjr.setEnabled(false);

        jLabel33.setText("应急人电话");

        jyjp.setEnabled(false);

        jLabel34.setText("应急人地址");

        jyjd.setEnabled(false);
        jyjd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jyjdActionPerformed(evt);
            }
        });

        jLabel26.setText("经办人");

        jjbr.setEnabled(false);

        jLabel40.setText("办理日期");

        jjbrq.setEnabled(false);
        jjbrq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jjbrqActionPerformed(evt);
            }
        });

        jhy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "未婚", "已婚" }));
        jhy.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(jLabel17)
                    .addComponent(jLabel6)
                    .addComponent(jLabel4)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addComponent(jLabel19))
                    .addComponent(jLabel3)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jhy, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jname)
                            .addComponent(jsex, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jyjr, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jLabel21)
                            .addComponent(jLabel33)
                            .addComponent(jLabel20)
                            .addComponent(jLabel8))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jyb, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jbd, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jphone, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jyjp, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jLabel2)
                            .addComponent(jLabel15)
                            .addComponent(jLabel16)
                            .addComponent(jLabel34))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jcphone, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(qq, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jwb, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                                    .addComponent(jLabel31)
                                    .addComponent(jLabel10))
                                .addGap(83, 83, 83)
                                .addComponent(canvas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jyjd)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                                        .addGap(0, 0, Short.MAX_VALUE)
                                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jjg, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)
                                            .addComponent(jmz))))
                                .addContainerGap())))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jwaddr, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jaddr, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(jPanel8Layout.createSequentialGroup()
                                            .addComponent(jsfz, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jemail, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(jwork, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPanel8Layout.createSequentialGroup()
                                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel13)
                                            .addComponent(jLabel14)
                                            .addComponent(jLabel18))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jzr, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
                                            .addComponent(jzsh)
                                            .addComponent(jzx))
                                        .addGap(0, 0, Short.MAX_VALUE))
                                    .addGroup(jPanel8Layout.createSequentialGroup()
                                        .addComponent(jLabel26)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jjbr, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel40)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jjbrq))))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addContainerGap())))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jphone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jcphone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(jname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(jjg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel31))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel6)
                    .addComponent(jLabel10)
                    .addComponent(jsex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15)
                    .addComponent(jmz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20)
                    .addComponent(qq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel9)
                    .addComponent(jLabel16)
                    .addComponent(jwb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21)
                    .addComponent(jyb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(canvas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jhy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32)
                    .addComponent(jyjr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel33)
                    .addComponent(jyjp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34)
                    .addComponent(jyjd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jemail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(jsfz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jzx, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jaddr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jzr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel14)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel12)
                    .addComponent(jwork, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13)
                    .addComponent(jzsh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel17)
                    .addComponent(jwaddr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jjbrq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel40)
                        .addComponent(jjbr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel26)))
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(27, 27, 27)
                        .addComponent(jLabel19))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(45, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("基本信息", jPanel8);

        jLabel22.setText("车辆品牌");

        brand.setText(" ");
        brand.setEnabled(false);
        brand.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                brandActionPerformed(evt);
            }
        });

        jLabel23.setText("汽车型号");

        cartype.setText(" ");
        cartype.setEnabled(false);

        jLabel24.setText("驾驶证号");

        jszh.setText(" ");
        jszh.setEnabled(false);

        jLabel25.setText("购车日期");

        gcrq.setText(" ");
        gcrq.setEnabled(false);

        jLabel28.setText("档位特征");

        dw.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "手动档", "自动档" }));
        dw.setEnabled(false);
        dw.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dwActionPerformed(evt);
            }
        });

        jLabel29.setText("领证日期");

        lzrq.setEnabled(false);
        lzrq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lzrqActionPerformed(evt);
            }
        });

        jLabel35.setText("车牌号码");

        jLabel36.setText("排量");

        cphm.setEnabled(false);
        cphm.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cphmActionPerformed(evt);
            }
        });

        pl.setEnabled(false);

        jLabel37.setText("驾龄");

        jl.setEnabled(false);
        jl.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jlActionPerformed(evt);
            }
        });

        xsz.setEnabled(false);
        xsz.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                xszActionPerformed(evt);
            }
        });

        jLabel39.setText("车辆行驶证号");

        jLabel46.setText("L");

        jLabel47.setText("年");

        jLabel48.setText("投保公司名称");

        tbgs.setEnabled(false);

        jLabel49.setText("投保日期");

        tbrq.setEnabled(false);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel25)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gcrq, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel24)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jszh, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel23)
                            .addComponent(jLabel22))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(brand, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)
                            .addComponent(cartype))))
                .addGap(37, 37, 37)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel35)
                    .addComponent(jLabel28)
                    .addComponent(jLabel29)
                    .addComponent(jLabel36))
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(lzrq, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)
                                .addComponent(cphm))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(pl, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel46, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(dw, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jLabel37)
                            .addComponent(jLabel39)
                            .addComponent(jLabel48)
                            .addComponent(jLabel49))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jl, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel47))
                            .addComponent(tbgs, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(xsz, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tbrq, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(46, 46, 46)
                        .addComponent(jLabel38)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(brand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35)
                    .addComponent(cphm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel37)
                    .addComponent(jl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel47))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(cartype, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel28)
                    .addComponent(dw, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel38)
                    .addComponent(xsz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(jszh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel29)
                    .addComponent(lzrq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel48)
                    .addComponent(tbgs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(gcrq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel36)
                    .addComponent(pl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel46)
                    .addComponent(jLabel49)
                    .addComponent(tbrq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(210, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("车辆信息", jPanel3);

        editbutton.setText("编辑");
        editbutton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editbuttonActionPerformed(evt);
            }
        });

        savebutton.setText("保存");
        savebutton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                savebuttonActionPerformed(evt);
            }
        });

        exit_edit.setText("返回");
        exit_edit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exit_editActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout usersLayout = new javax.swing.GroupLayout(users);
        users.setLayout(usersLayout);
        usersLayout.setHorizontalGroup(
            usersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, usersLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(exit_edit)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(editbutton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(savebutton)
                .addContainerGap())
        );
        usersLayout.setVerticalGroup(
            usersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(usersLayout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(usersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(savebutton)
                    .addComponent(editbutton)
                    .addComponent(exit_edit))
                .addGap(0, 15, Short.MAX_VALUE))
        );

        users.setBounds(0, 60, 690, 430);
        jLayeredPane2.add(users, javax.swing.JLayeredPane.DEFAULT_LAYER);
        users.setVisible(false);

        jf.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel43.setFont(new java.awt.Font("Lucida Grande", 0, 18)); // NOI18N
        jLabel43.setText("施工中....");

        javax.swing.GroupLayout jfLayout = new javax.swing.GroupLayout(jf);
        jf.setLayout(jfLayout);
        jfLayout.setHorizontalGroup(
            jfLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jfLayout.createSequentialGroup()
                .addGap(314, 314, 314)
                .addComponent(jLabel43)
                .addContainerGap(302, Short.MAX_VALUE))
        );
        jfLayout.setVerticalGroup(
            jfLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jfLayout.createSequentialGroup()
                .addContainerGap(201, Short.MAX_VALUE)
                .addComponent(jLabel43)
                .addGap(203, 203, 203))
        );

        jf.setBounds(0, 60, 690, 430);
        jLayeredPane2.add(jf, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jf.setVisible(false);

        yw.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jCheckBox1.setText("规费代缴");

        jCheckBox2.setText("新车上牌");
        jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox2ActionPerformed(evt);
            }
        });

        jCheckBox3.setText("救援服务");

        jCheckBox4.setText("酒后代驾/新手陪驾");

        jCheckBox5.setText("电子警察实时通知");
        jCheckBox5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox5ActionPerformed(evt);
            }
        });

        jCheckBox6.setText("车辆年检到期提醒");

        jCheckBox7.setText("自驾游");

        jCheckBox8.setText("参观活动");

        jCheckBox9.setText("故障急修");

        jCheckBox10.setText("换装备胎");

        jCheckBox11.setText("车辆保险到期提醒");

        jCheckBox12.setText("户外活动");

        jCheckBox13.setText("违章未处理提醒");

        jCheckBox14.setText("文娱活动");

        jCheckBox15.setText("消费打折");

        jCheckBox16.setText("车辆保养维护");

        jCheckBox17.setText("牌证补办");
        jCheckBox17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox17ActionPerformed(evt);
            }
        });

        jCheckBox18.setText("驾照年检");
        jCheckBox18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox18ActionPerformed(evt);
            }
        });

        jCheckBox19.setText("困境救助");

        jCheckBox20.setText("车辆规费到期提醒");

        jCheckBox21.setText("汽车越野");

        jCheckBox22.setText("驾驶证年审提醒");

        jCheckBox23.setText("各类球赛");

        jCheckBox24.setText("新车试驾");

        jCheckBox25.setText("洗车");

        jCheckBox26.setText("车辆过户/变更");
        jCheckBox26.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox26ActionPerformed(evt);
            }
        });

        jCheckBox27.setText("电子警察违章代办");
        jCheckBox27.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox27ActionPerformed(evt);
            }
        });

        jCheckBox28.setText("拖车牵引");

        jCheckBox29.setText("会员活动提醒");

        jCheckBox30.setText("专题讲座");

        jCheckBox31.setText("驾驶证到期提醒");

        jCheckBox32.setText("理财party");

        jCheckBox33.setText("会员团购优惠");

        jCheckBox34.setText("汽车美容");

        jCheckBox35.setText("业务咨询");
        jCheckBox35.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox35ActionPerformed(evt);
            }
        });

        jCheckBox36.setText("车辆保险办理");
        jCheckBox36.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox36ActionPerformed(evt);
            }
        });

        jCheckBox37.setText("应急送油");
        jCheckBox37.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox37ActionPerformed(evt);
            }
        });

        jCheckBox39.setText("聚会狂欢");

        jCheckBox40.setText("交管信息提醒");

        jCheckBox43.setText("车辆租赁");

        jCheckBox44.setText("旧车交易");
        jCheckBox44.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox44ActionPerformed(evt);
            }
        });

        jCheckBox45.setText("保险理赔");
        jCheckBox45.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox45ActionPerformed(evt);
            }
        });

        jLabel41.setText("车务服务");

        jLabel42.setText("提醒服务");

        jLabel44.setText("会员活动");

        jLabel45.setText("救援服务");

        jCheckBox38.setText("应急开锁");
        jCheckBox38.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox38ActionPerformed(evt);
            }
        });

        jCheckBox41.setText("水箱补水");

        jCheckBox42.setText("异地救援");

        javax.swing.GroupLayout ywLayout = new javax.swing.GroupLayout(yw);
        yw.setLayout(ywLayout);
        ywLayout.setHorizontalGroup(
            ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ywLayout.createSequentialGroup()
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(ywLayout.createSequentialGroup()
                        .addGap(17, 17, 17)
                        .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCheckBox2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jCheckBox9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jCheckBox28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(ywLayout.createSequentialGroup()
                                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jCheckBox5)
                                    .addComponent(jCheckBox6)
                                    .addComponent(jCheckBox3)
                                    .addComponent(jCheckBox1)
                                    .addComponent(jCheckBox7)
                                    .addComponent(jCheckBox8)
                                    .addComponent(jCheckBox4, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 4, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCheckBox19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jCheckBox41, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jCheckBox17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(ywLayout.createSequentialGroup()
                                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jCheckBox23)
                                    .addComponent(jCheckBox12)
                                    .addComponent(jCheckBox11)
                                    .addComponent(jCheckBox13)
                                    .addComponent(jCheckBox15)
                                    .addComponent(jCheckBox18)
                                    .addComponent(jCheckBox16, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 4, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCheckBox27, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                            .addComponent(jCheckBox26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jCheckBox25)
                            .addComponent(jCheckBox24)
                            .addComponent(jCheckBox22)
                            .addComponent(jCheckBox20)
                            .addComponent(jCheckBox21)
                            .addComponent(jCheckBox32)
                            .addComponent(jCheckBox37, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jCheckBox38, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 22, Short.MAX_VALUE)
                        .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCheckBox42, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(ywLayout.createSequentialGroup()
                                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jCheckBox34)
                                    .addComponent(jCheckBox31)
                                    .addComponent(jCheckBox29)
                                    .addComponent(jCheckBox30)
                                    .addComponent(jCheckBox14)
                                    .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(jCheckBox36, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE)
                                        .addComponent(jCheckBox33, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jCheckBox35, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addComponent(jCheckBox10, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 4, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                        .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCheckBox45, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)
                            .addComponent(jCheckBox44, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jCheckBox43, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jCheckBox40)
                            .addComponent(jCheckBox39)))
                    .addGroup(ywLayout.createSequentialGroup()
                        .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(ywLayout.createSequentialGroup()
                                .addGap(17, 17, 17)
                                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel44)
                                    .addComponent(jLabel41)
                                    .addComponent(jLabel45)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ywLayout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jLabel42)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jSeparator5)
                            .addComponent(jSeparator4)
                            .addComponent(jSeparator1)
                            .addComponent(jSeparator2))))
                .addGap(21, 21, 21))
        );
        ywLayout.setVerticalGroup(
            ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ywLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel41)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox45)
                    .addComponent(jCheckBox18)
                    .addComponent(jCheckBox27)
                    .addComponent(jCheckBox1)
                    .addComponent(jCheckBox36))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox17)
                    .addComponent(jCheckBox2)
                    .addComponent(jCheckBox26)
                    .addComponent(jCheckBox44)
                    .addComponent(jCheckBox35))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox16)
                    .addComponent(jCheckBox34)
                    .addComponent(jCheckBox3)
                    .addComponent(jCheckBox25)
                    .addComponent(jCheckBox43))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox24)
                    .addComponent(jCheckBox15)
                    .addComponent(jCheckBox33)
                    .addComponent(jCheckBox4))
                .addGap(18, 18, 18)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel42)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox13)
                    .addComponent(jCheckBox22)
                    .addComponent(jCheckBox31)
                    .addComponent(jCheckBox5)
                    .addComponent(jCheckBox40))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox11)
                    .addComponent(jCheckBox20)
                    .addComponent(jCheckBox29)
                    .addComponent(jCheckBox6))
                .addGap(18, 18, 18)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel44)
                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox12)
                    .addComponent(jCheckBox7)
                    .addComponent(jCheckBox21)
                    .addComponent(jCheckBox30)
                    .addComponent(jCheckBox39))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jCheckBox8)
                    .addComponent(jCheckBox14)
                    .addComponent(jCheckBox23)
                    .addComponent(jCheckBox32))
                .addGap(18, 18, 18)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel45)
                    .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox9)
                    .addComponent(jCheckBox10)
                    .addComponent(jCheckBox19)
                    .addComponent(jCheckBox37))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(ywLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox28)
                    .addComponent(jCheckBox42)
                    .addComponent(jCheckBox41)
                    .addComponent(jCheckBox38))
                .addContainerGap(52, Short.MAX_VALUE))
        );

        yw.setBounds(0, 60, 690, 430);
        jLayeredPane2.add(yw, javax.swing.JLayeredPane.DEFAULT_LAYER);
        yw.setVisible(false);

        other.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        tables.setAutoCreateRowSorter(true);
        tables.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "NO.", "姓名", "性别", "中燃石油卡号", "中信银行卡号", "手机号码", "QQ", "车辆品牌", "车型", "车牌号码"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        showdata();
        tables.setColumnSelectionAllowed(true);
        tables.getTableHeader().setReorderingAllowed(false);
        jscroll.setViewportView(tables);
        tables.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tables.getColumnModel().getColumn(0).setResizable(false);
        tables.getColumnModel().getColumn(1).setResizable(false);
        tables.getColumnModel().getColumn(1).setPreferredWidth(30);
        tables.getColumnModel().getColumn(2).setResizable(false);
        tables.getColumnModel().getColumn(2).setPreferredWidth(15);
        tables.getColumnModel().getColumn(3).setResizable(false);
        tables.getColumnModel().getColumn(3).setPreferredWidth(65);
        tables.getColumnModel().getColumn(4).setResizable(false);
        tables.getColumnModel().getColumn(4).setPreferredWidth(65);
        tables.getColumnModel().getColumn(5).setResizable(false);
        tables.getColumnModel().getColumn(5).setPreferredWidth(66);
        tables.getColumnModel().getColumn(6).setResizable(false);
        tables.getColumnModel().getColumn(6).setPreferredWidth(55);
        tables.getColumnModel().getColumn(7).setResizable(false);
        tables.getColumnModel().getColumn(7).setPreferredWidth(40);
        tables.getColumnModel().getColumn(8).setResizable(false);
        tables.getColumnModel().getColumn(8).setPreferredWidth(20);
        tables.getColumnModel().getColumn(9).setResizable(false);
        tables.getColumnModel().getColumn(9).setPreferredWidth(45);
        tables.addMouseListener(new UserMouseAdapter() {
            /** *//**
            * 鼠标单击事件
            * @param e 事件源参数
            */
            public void mouseSingleClicked(MouseEvent e){
                //System.out.println("Single Clicked!");
                int  rowI  = tables.rowAtPoint(e.getPoint());// 得到table的行号
                if (rowI > -1)
                System.out.println("单击鼠标 "+tables.getModel().getValueAt(rowI, 1));
            }

            /** *//**
            * 鼠标双击事件
            * @param e 事件源参数
            */
            public void mouseDoubleClicked(MouseEvent e){
                //System.out.println("Doublc Clicked!");
                int  rowI  = tables.rowAtPoint(e.getPoint());;// 得到table的行号
                if (rowI > -1)
                System.out.println("双击鼠标 "+tables.getModel().getValueAt(rowI, 1)+tables.getValueAt(tables.getSelectedRow(), 1) );
                showClick(tables.getValueAt(tables.getSelectedRow(), 1) );
            }

        });

        javax.swing.GroupLayout otherLayout = new javax.swing.GroupLayout(other);
        other.setLayout(otherLayout);
        otherLayout.setHorizontalGroup(
            otherLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jscroll, javax.swing.GroupLayout.PREFERRED_SIZE, 686, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        otherLayout.setVerticalGroup(
            otherLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jscroll, javax.swing.GroupLayout.DEFAULT_SIZE, 426, Short.MAX_VALUE)
        );

        other.setBounds(0, 60, 690, 430);
        jLayeredPane2.add(other, javax.swing.JLayeredPane.DEFAULT_LAYER);
        other.setVisible(false);

        jLabel7.setText("会员编号");

        jno.setText("DM20120000");
        jno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jnoActionPerformed(evt);
            }
        });

        jLabel30.setText("会员卡号");

        jmt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmtActionPerformed(evt);
            }
        });

        jLabel27.setText("入会时间");

        daochu.setText("导出");
        daochu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                daochuActionPerformed(evt);
            }
        });
        daochu.setVisible(false);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jno, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel30)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jmt, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel27)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jdata, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE)
                .addComponent(daochu))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jdata, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jmt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27)
                    .addComponent(jLabel7)
                    .addComponent(jno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30)
                    .addComponent(daochu))
                .addContainerGap(18, Short.MAX_VALUE))
        );

        jPanel2.setBounds(0, 0, 660, 60);
        jLayeredPane2.add(jPanel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLayeredPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 701, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void userButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_userButtonActionPerformed
        // TODO add your handling code here:
        main.setVisible(true);
        jf.setVisible(false);
        yw.setVisible(false);
        other.setVisible(false);
        users.setVisible(false);
    }//GEN-LAST:event_userButtonActionPerformed

    @SuppressWarnings("empty-statement")
    private void hyjfActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hyjfActionPerformed
        users.setVisible(false);
        jf.setVisible(true);
        yw.setVisible(false);
        other.setVisible(false);
        main.setVisible(false);
       
        
     
        // TODO add your handling code here:
    }//GEN-LAST:event_hyjfActionPerformed

    private void ywblActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ywblActionPerformed
// TODO add your handling code here:
        users.setVisible(false);
        jf.setVisible(false);
        yw.setVisible(true);
        other.setVisible(false);
        main.setVisible(false);
    }//GEN-LAST:event_ywblActionPerformed

    private void fzxxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fzxxActionPerformed
        // TODO add your handling code here:
        users.setVisible(false);
        jf.setVisible(false);
        yw.setVisible(false);
        other.setVisible(true);
        main.setVisible(false);
        daochu.setVisible(true);
        showdata();
    }//GEN-LAST:event_fzxxActionPerformed

    private void dwActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dwActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_dwActionPerformed

    private void brandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_brandActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_brandActionPerformed

    private void lzrqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lzrqActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_lzrqActionPerformed

    private void cphmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cphmActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cphmActionPerformed

    private void jlActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jlActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jlActionPerformed

    private void xszActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_xszActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_xszActionPerformed

    private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox2ActionPerformed

    private void jCheckBox17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox17ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox17ActionPerformed

    private void jCheckBox18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox18ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox18ActionPerformed

    private void jCheckBox26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox26ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox26ActionPerformed

    private void jCheckBox27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox27ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox27ActionPerformed

    private void jCheckBox35ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox35ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox35ActionPerformed

    private void jCheckBox36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox36ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox36ActionPerformed

    private void jCheckBox44ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox44ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox44ActionPerformed

    private void jCheckBox45ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox45ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox45ActionPerformed

    private void jCheckBox5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox5ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox5ActionPerformed

    private void jCheckBox37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox37ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox37ActionPerformed

    private void jCheckBox38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox38ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox38ActionPerformed

    public String quotate(String content) {

        return "'" + content + "',";
    }
    private void jmtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmtActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jmtActionPerformed

    private void jjbrqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jjbrqActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jjbrqActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        main.setVisible(false);
        users.setVisible(true);
        jf.setVisible(false);
        yw.setVisible(false);
        other.setVisible(false);

        editbutton.setEnabled(false);


        clear();
        enabled();
        editselect = 0;
        addselect = 1;
//  try
//  {
//  Class.forName(driver);
//  }
//  catch(Exception E)
//  {
//        E.printStackTrace();  
//  System.out.print("无法加载驱动："+driver);
//  }
//  try
//  {
//  Connection con=DriverManager.getConnection(url,user,password);
//  if(!con.isClosed())
//  System.out.println("打开数据库成功"); 
//  Statement smt=con.createStatement();
////  smt.executeUpdate("insert into mail(number) values(1)");
//  String SQL="SELECT MAX(no) FROM user";
//     ResultSet rs=smt.executeQuery(SQL);
//       while(rs.next()){
//        System.out.print(rs.getString(1));
//         String s=rs.getString(1);
//         int  n=Integer.parseInt(s.substring(8))+1;
//
//        as ="DM20120000"+ String.valueOf(n);
//
//        if(n>9){
//            as ="DM2012000"+ String.valueOf(n);
//        }
//        if(n>99){
//            as ="DM201200"+ String.valueOf(n);
//        }
//        if(n>999){
//            as ="DM20120"+ String.valueOf(n);
//        } 
//        jno.setText(as);
//       }       
//  smt.close();
//  con.close();
//  }
//  catch(SQLException SE)
//  {
//      System.out.print(SE);
//  System.out.print("打开数据库失败");
//  }



    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        new search().show();
    }//GEN-LAST:event_jButton3ActionPerformed

    private void editbuttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editbuttonActionPerformed
        // TODO add your handling code here:
        enabled();
        editselect = 1;
        addselect = 0;
    }//GEN-LAST:event_editbuttonActionPerformed

    private void savebuttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_savebuttonActionPerformed
        // TODO add your handling code here:

        try {
            Connection con = DriverManager.getConnection(url, user, password);
            if (!con.isClosed()) {
                System.out.println("打开数据库成功");
            }

            String name = jname.getText();
            String no = jno.getText();
            String phone = jphone.getText();
            String cphone = jcphone.getText();
            String jqq = qq.getText();
            String sex = jsex.getSelectedItem().toString();
            String bd = jbd.getText();
            String hy = jhy.getSelectedItem().toString();
            String jg = jjg.getText();
            String yb = jyb.getText();
            String mz = jmz.getText();
            String wb = jwb.getText();
            String yjr = jyjr.getText();
            String yjp = jyjp.getText();
            String yjd = jyjd.getText();

            String work = jwork.getText();
            String addr = jaddr.getText();
            String waddr = jwaddr.getText();
            String zx = jzx.getText();
            String zr = jzr.getText();
            String zsh = jzsh.getText();
            String jbr = jjbr.getText();
            String jbrq = jjbrq.getText();
            String sfz = jsfz.getText();
            String email = jemail.getText();
            String other = jother.getText();

            String jbrand = brand.getText();
            String jcartype = cartype.getText();
            String jjszh = jszh.getText();
            String jgcrq = gcrq.getText();
            String jdw = dw.getSelectedItem().toString();
            String jlzrq = lzrq.getText();
            String jpl = pl.getText();
            String jjl = jl.getText();
            String jcphm = cphm.getText();
            String jxsz = xsz.getText();
            String jtbgs = tbgs.getText();
            String jtbrq = tbrq.getText();

            if (name.equals("")) {
                JOptionPane.showMessageDialog(this, "输入不能为空");
                addselect = 0;
            } else {

                if (addselect == 1) {

                    String insertStr = "";
                    insertStr = "INSERT INTO `damei`.`user` (`No`, `name`, `sex`, `jg`, `phone`, `cphone`, `jqq`, `sfz`, "
                            + "`email`,`mz`, `bd`, `hy`, `yb`, `wb`, `yjr`, `yjp`, `yjd`, `work`, `addr`,"
                            + "`waddr`, `zx`, `zr`, `zsh`, `jbr`, `jbrq`, `bz`, `cphm`)  "
                            + "values(" + quotate(no) + quotate(name) + quotate(sex) + quotate(jg) + quotate(phone) + quotate(cphone) + quotate(jqq) + quotate(sfz)
                            + quotate(email) + quotate(mz) + quotate(bd) + quotate(hy) + quotate(yb) + quotate(wb) + quotate(yjr) + quotate(yjp) + quotate(yjd) + quotate(work) + quotate(addr)
                            + quotate(waddr) + quotate(zx) + quotate(zr) + quotate(zsh) + quotate(jbr) + quotate(jbrq) + quotate(other) + "'" + jcphm + "');";

                    String inserdrv = "INSERT INTO `damei`.`driver` (`No`, `name`,`cphone`,`Brand`, `cartype`, `jszh`, `gcrq`, `lzrq`, `pl`, `dw`, `cphm`, `jl`, `xsz`, `tbgs`, `tbrq`) VALUES("
                            + quotate(no) + quotate(name) + quotate(cphone) + quotate(jbrand) + quotate(jcartype) + quotate(jjszh) + quotate(jgcrq) + quotate(jlzrq) + quotate(jpl) + quotate(jdw) + quotate(jcphm) + quotate(jjl) + quotate(jxsz) + quotate(jtbgs) + "'" + jtbrq + "')";

                    stmt = con.createStatement();

                    int result = stmt.executeUpdate(insertStr);

                    int result2 = stmt.executeUpdate(inserdrv);
                    JOptionPane.showMessageDialog(this, "新增成功");
                    System.out.print("1 row inserted");
                    addselect = 0;
                } else if (editselect == 1) {
                    int n = Integer.parseInt(no.substring(8)) + 1;
                    String upstr = "UPDATE `damei`.`user` SET`No`='" + no + "',`name`='" + name + "',`sex`='" + sex + "', `jg`='" + jg + "', `phone`='" + phone + "', `cphone`='" + cphone + "',"
                            + " `jqq`='" + jqq + "', `sfz`='" + sfz + "', `email`='" + email + "', `bd`='" + bd + "', `hy`='" + hy + "', `yb`='" + yb + "', "
                            + "`wb`='" + wb + "', `yjr`='" + yjr + "', `yjp`='" + yjp + "', `yjd`='" + yjd + "', `work`='" + work + "', `addr`='" + addr + "', `waddr`='" + waddr + "',"
                            + " `zx`='" + zx + "', `zr`='" + zr + "', `zsh`='" + zsh + "',`jbr`='" + jbr + "', `jbrq`='" + jbrq + "', `bz`='" + other + "' WHERE  `No`='" + no + "';";


                    String updatedrv = "UPDATE `damei`.`driver` SET `No`='" + no + "',`name`='" + name + "',`cphone`='" + cphone + "', `Brand`='" + jbrand + "', `cartype`='" + jcartype + "', `jszh`='" + jjszh + "',"
                            + " `gcrq`='" + jgcrq + "', `lzrq`='" + jlzrq + "', `pl`='" + jpl + "', `dw`='" + jdw + "', `cphm`='" + jcphm + "', `jl`='" + jjl + "',`xsz`='" + jxsz + "', `tbgs`='" + jtbgs + "',`tbrq`='" + jtbrq + "' WHERE  `No`='" + no + "';";
//          
                    stmt = con.createStatement();

                    int savemod = stmt.executeUpdate("SET SQL_SAFE_UPDATES=0;");

                    int result = stmt.executeUpdate(upstr);

                    int result2 = stmt.executeUpdate(updatedrv);

                    System.out.print("updata 1 row    " + n);
                    editselect = 0;
                    JOptionPane.showMessageDialog(this, "编辑完成");

                }

                stmt.close();
                con.close();
                main.setVisible(true);
                users.setVisible(false);

                enablefalse();
            }
        } catch (Exception e) {
            System.out.println("Error occurred in inserting data");
            JOptionPane.showMessageDialog(this, "添加数据出错请检查输入内容");
            e.printStackTrace();
        }


    }//GEN-LAST:event_savebuttonActionPerformed

    private void jyjdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jyjdActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jyjdActionPerformed

    private void jzshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jzshActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jzshActionPerformed

    private void jbdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbdActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jbdActionPerformed

    private void jsexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jsexActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jsexActionPerformed

    private void jwaddrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jwaddrActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jwaddrActionPerformed

    private void jwbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jwbActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jwbActionPerformed

    private void jzrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jzrActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jzrActionPerformed

    private void jworkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jworkActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jworkActionPerformed

    private void jcphoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcphoneActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jcphoneActionPerformed

    private void jphoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jphoneActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jphoneActionPerformed

    private void jnameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jnameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jnameActionPerformed

    private void jnoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jnoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jnoActionPerformed

    private void qqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_qqActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_qqActionPerformed

    private void exit_editActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exit_editActionPerformed
        // TODO add your handling code here:
        main.setVisible(true);
        users.setVisible(false);
        jf.setVisible(false);
        yw.setVisible(false);
        other.setVisible(false);
        enablefalse();
        addselect = 0;
        editselect = 0;
    }//GEN-LAST:event_exit_editActionPerformed

    private void daochuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_daochuActionPerformed
        // TODO add your handling code here:
        
        toexcel();
    }//GEN-LAST:event_daochuActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        driver = "com.mysql.jdbc.Driver";
        url = "jdbc:mysql://192.168.1.250:3306/damei";
        user = "root";
        password = "root";



//  try
//  {
//  Class.forName(driver);
//  }
//  catch(Exception E)
//  {
//        E.printStackTrace();  
//  System.out.print("无法加载驱动："+driver);
//  }
//  try
//  {
//  Connection con=DriverManager.getConnection(url,user,password);
//  if(!con.isClosed())
//  System.out.println("打开数据库成功"); 
//  Statement smt=con.createStatement();
////  smt.executeUpdate("insert into mail(number) values(1)");
//  String SQL="SELECT * FROM user";
//     ResultSet rs=smt.executeQuery(SQL);
//       while(rs.next()){
//        System.out.print(rs.getString(1));
//         System.out.println(rs.getString(2));
//       }       
//  smt.close();
//  con.close();
//  }
//  catch(SQLException SE)
//  {
//      System.out.print(SE);
//  System.out.print("打开数据库失败");
//  }
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Main().setVisible(true);

            }
        });
    }

    public void enabled() {
        jname.setEnabled(true);
        jno.setEnabled(true);
        jphone.setEnabled(true);
        jcphone.setEnabled(true);
        jaddr.setEnabled(true);
        jjg.setEnabled(true);
        jsex.setEnabled(true);
        jbd.setEnabled(true);
        jhy.setEnabled(true);
        qq.setEnabled(true);
        jyb.setEnabled(true);
        jmz.setEnabled(true);
        jwb.setEnabled(true);
        jyjr.setEnabled(true);
        jyjp.setEnabled(true);
        jyjd.setEnabled(true);
        jwork.setEnabled(true);
        jwaddr.setEnabled(true);
        jzx.setEnabled(true);
        jzr.setEnabled(true);
        jzsh.setEnabled(true);
        jjbr.setEnabled(true);
        jjbrq.setEnabled(true);
        jsfz.setEnabled(true);
        jemail.setEnabled(true);
        jother.setEnabled(true);
        brand.setEnabled(true);
        cartype.setEnabled(true);
        jszh.setEnabled(true);
        gcrq.setEnabled(true);
        cphm.setEnabled(true);
        dw.setEnabled(true);
        lzrq.setEnabled(true);
        pl.setEnabled(true);
        jl.setEnabled(true);
        xsz.setEnabled(true);
        jaddr.setEnabled(true);
        tbgs.setEnabled(true);
        tbrq.setEnabled(true);
    }

    public void geted() {
        String name = jname.getText();
        String no = jno.getText();
        String phone = jphone.getText();
        String cphone = jcphone.getText();
        String jqq = qq.getText();
        String sex = jsex.getSelectedItem().toString();
        String bd = jbd.getText();
        String hy = jhy.getSelectedItem().toString();
        String jg = jjg.getText();
        String yb = jyb.getText();
        String mz = jmz.getText();
        String wb = jwb.getText();
        String yjr = jyjr.getText();
        String yjp = jyjp.getText();
        String yjd = jyjd.getText();

        String work = jwork.getText();
        String addr = jaddr.getText();
        String waddr = jwaddr.getText();
        String zx = jzx.getText();
        String zr = jzr.getText();
        String zsh = jzsh.getText();
        String jbr = jjbr.getText();
        String jbrq = jjbrq.getText();
        String sfz = jsfz.getText();
        String email = jemail.getText();
        String other = jother.getText();
        String jbrand = brand.getText();
        String jcartype = cartype.getText();
        String jjszh = jszh.getText();
        String jgcrq = gcrq.getText();
        String jdw = dw.getSelectedItem().toString();
        String jlzrq = lzrq.getText();
        String jpl = pl.getText();
        String jjl = jl.getText();
        String jcphm = cphm.getText();
        String jxsz = xsz.getText();
        String jtbgs = tbgs.getText();
        String jtbrq = tbrq.getText();
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public static javax.swing.JTextField brand;
    private java.awt.Canvas canvas1;
    public static javax.swing.JTextField cartype;
    public static javax.swing.JTextField cphm;
    private javax.swing.JButton daochu;
    public static javax.swing.JComboBox dw;
    public static javax.swing.JButton editbutton;
    private javax.swing.JButton exit_edit;
    private javax.swing.JButton fzxx;
    public static javax.swing.JTextField gcrq;
    private javax.swing.JButton hyjf;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox10;
    private javax.swing.JCheckBox jCheckBox11;
    private javax.swing.JCheckBox jCheckBox12;
    private javax.swing.JCheckBox jCheckBox13;
    private javax.swing.JCheckBox jCheckBox14;
    private javax.swing.JCheckBox jCheckBox15;
    private javax.swing.JCheckBox jCheckBox16;
    private javax.swing.JCheckBox jCheckBox17;
    private javax.swing.JCheckBox jCheckBox18;
    private javax.swing.JCheckBox jCheckBox19;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox20;
    private javax.swing.JCheckBox jCheckBox21;
    private javax.swing.JCheckBox jCheckBox22;
    private javax.swing.JCheckBox jCheckBox23;
    private javax.swing.JCheckBox jCheckBox24;
    private javax.swing.JCheckBox jCheckBox25;
    private javax.swing.JCheckBox jCheckBox26;
    private javax.swing.JCheckBox jCheckBox27;
    private javax.swing.JCheckBox jCheckBox28;
    private javax.swing.JCheckBox jCheckBox29;
    private javax.swing.JCheckBox jCheckBox3;
    private javax.swing.JCheckBox jCheckBox30;
    private javax.swing.JCheckBox jCheckBox31;
    private javax.swing.JCheckBox jCheckBox32;
    private javax.swing.JCheckBox jCheckBox33;
    private javax.swing.JCheckBox jCheckBox34;
    private javax.swing.JCheckBox jCheckBox35;
    private javax.swing.JCheckBox jCheckBox36;
    private javax.swing.JCheckBox jCheckBox37;
    private javax.swing.JCheckBox jCheckBox38;
    private javax.swing.JCheckBox jCheckBox39;
    private javax.swing.JCheckBox jCheckBox4;
    private javax.swing.JCheckBox jCheckBox40;
    private javax.swing.JCheckBox jCheckBox41;
    private javax.swing.JCheckBox jCheckBox42;
    private javax.swing.JCheckBox jCheckBox43;
    private javax.swing.JCheckBox jCheckBox44;
    private javax.swing.JCheckBox jCheckBox45;
    private javax.swing.JCheckBox jCheckBox5;
    private javax.swing.JCheckBox jCheckBox6;
    private javax.swing.JCheckBox jCheckBox7;
    private javax.swing.JCheckBox jCheckBox8;
    private javax.swing.JCheckBox jCheckBox9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLayeredPane jLayeredPane2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JTabbedPane jTabbedPane1;
    public static javax.swing.JTextField jaddr;
    public static javax.swing.JTextField jbd;
    public static javax.swing.JTextField jcphone;
    private javax.swing.JTextField jdata;
    public static javax.swing.JTextField jemail;
    public static javax.swing.JPanel jf;
    public static javax.swing.JComboBox jhy;
    public static javax.swing.JTextField jjbr;
    public static javax.swing.JTextField jjbrq;
    public static javax.swing.JTextField jjg;
    public static javax.swing.JTextField jl;
    private javax.swing.JTextField jmt;
    public static javax.swing.JTextField jmz;
    public static javax.swing.JTextField jname;
    public static javax.swing.JTextField jno;
    public static javax.swing.JTextArea jother;
    public static javax.swing.JTextField jphone;
    private javax.swing.JScrollPane jscroll;
    public static javax.swing.JComboBox jsex;
    public static javax.swing.JTextField jsfz;
    public static javax.swing.JTextField jszh;
    public static javax.swing.JTextField jwaddr;
    public static javax.swing.JTextField jwb;
    public static javax.swing.JTextField jwork;
    public static javax.swing.JTextField jyb;
    public static javax.swing.JTextField jyjd;
    public static javax.swing.JTextField jyjp;
    public static javax.swing.JTextField jyjr;
    public static javax.swing.JTextField jzr;
    public static javax.swing.JTextField jzsh;
    public static javax.swing.JTextField jzx;
    public static javax.swing.JTextField lzrq;
    public static javax.swing.JPanel main;
    public static javax.swing.JPanel other;
    public static javax.swing.JTextField pl;
    public static javax.swing.JTextField qq;
    public static javax.swing.JButton savebutton;
    private javax.swing.JTable tables;
    public static javax.swing.JTextField tbgs;
    public static javax.swing.JTextField tbrq;
    private javax.swing.JButton userButton;
    public static javax.swing.JPanel users;
    public static javax.swing.JTextField xsz;
    public static javax.swing.JPanel yw;
    private javax.swing.JButton ywbl;
    // End of variables declaration//GEN-END:variables
    private java.sql.Statement stmt;

    private void clear() {
        jname.setText(null);
        jsex.setSelectedIndex(0);
        jhy.setSelectedIndex(0);
        jphone.setText(null);
        jcphone.setText(null);
        jjg.setText(null);
        jbd.setText(null);
        qq.setText(null);
        jyb.setText(null);
        jwb.setText(null);
        jyjr.setText(null);
        jyjp.setText(null);
        jyjd.setText(null);
        jwork.setText(null);
        jwaddr.setText(null);
        jzx.setText(null);
        jzr.setText(null);
        jzsh.setText(null);
        jjbr.setText(null);
        jjbrq.setText(null);
        jsfz.setText(null);
        jemail.setText(null);
        jother.setText(null);
        brand.setText(null);
        cartype.setText(null);
        jszh.setText(null);
        gcrq.setText(null);
        cphm.setText(null);
        dw.setSelectedIndex(0);
        lzrq.setText(null);
        pl.setText(null);
        jl.setText(null);
        xsz.setText(null);
        jaddr.setText(null);
        jmz.setText(null);
        tbgs.setText(null);
        tbrq.setText(null);
    }

    private void enablefalse() {
        jname.setEnabled(false);
        jno.setEnabled(false);
        jphone.setEnabled(false);
        jcphone.setEnabled(false);
        jaddr.setEnabled(false);
        jjg.setEnabled(false);
        jsex.setEnabled(false);
        jbd.setEnabled(false);
        jhy.setEnabled(false);
        qq.setEnabled(false);
        jyb.setEnabled(false);
        jwb.setEnabled(false);
        jyjr.setEnabled(false);
        jyjp.setEnabled(false);
        jyjd.setEnabled(false);
        jwork.setEnabled(false);
        jwaddr.setEnabled(false);
        jzx.setEnabled(false);
        jzr.setEnabled(false);
        jzsh.setEnabled(false);
        jjbr.setEnabled(false);
        jjbrq.setEnabled(false);
        jsfz.setEnabled(false);
        jemail.setEnabled(false);
        jother.setEnabled(false);
        brand.setEnabled(false);
        cartype.setEnabled(false);
        jszh.setEnabled(false);
        gcrq.setEnabled(false);
        cphm.setEnabled(false);
        dw.setEnabled(false);
        lzrq.setEnabled(false);
        pl.setEnabled(false);
        jl.setEnabled(false);
        xsz.setEnabled(false);
        jmz.setEnabled(false);
        jaddr.setEnabled(false);
        tbgs.setEnabled(false);
        tbrq.setEnabled(false);
    }

    @SuppressWarnings("empty-statement")
    private void showdata() {
        tableModel = (DefaultTableModel) tables.getModel();
        tableModel.setRowCount(0);
        try {
            Connection con = DriverManager.getConnection(url, user, password);
            if (!con.isClosed()) {
                System.out.println("打开数据库成功");
            }
            Statement smt = con.createStatement();
            tables.removeAll();
            String SQLd = "select user.No,user.name,user.sex, user.jqq,user.cphone,user.zr,user.zx,"
                    + "driver.Brand,driver.cartype, driver.cphm from user,driver where user.id = driver.id;";

            ResultSet rsuser1 = smt.executeQuery(SQLd);
            while (rsuser1.next()) {
                sno = rsuser1.getObject(1).toString();
                sname = rsuser1.getObject(2).toString();
                ssex = rsuser1.getObject(3).toString();
                sqq = rsuser1.getObject(4).toString();
                scphone = rsuser1.getObject(5).toString();
                szr = rsuser1.getObject(6).toString();
                szx = rsuser1.getObject(7).toString();
                spp = rsuser1.getObject(8).toString();
                sxh = rsuser1.getObject(9).toString();
                sjz = rsuser1.getObject(10).toString();





                String[] data = {sno, sname, ssex, szr, szx, scphone, sqq, spp, sxh, sjz};

                tableModel.addRow(data);

            }
            smt.close();
            con.close();
        } catch (SQLException SE) {
            System.out.print(SE);
            System.out.print("打开数据库失败");
        }
    }

    public void toexcel() {
       
        Calendar cal=Calendar.getInstance(); 
       int y=cal.get(Calendar.YEAR); 
       int m=cal.get(Calendar.MONTH)+1;
       int d=cal.get(Calendar.DATE);
try
{   
    //open file.   
    WritableWorkbook wbook = Workbook.createWorkbook(new File("D:/会员信息总表"+y+m+d+".xls"));   

    //create Sheet named "Sheet_1". 0 means this is 1st page.   
    WritableSheet wsheet = wbook.createSheet(""+y+m+d, 0);   

       
 Connection con=DriverManager.getConnection(url,user,password);
  if(!con.isClosed()){
    
   String[] titles = {"会员编号", "会员名称","性别","出生日期","手机号码","QQ","购买保险","中石化加油卡号","中燃石油卡号","中信银行卡号","车辆品牌","车型","车牌号码","驾龄"};
  
  // 设置Excel表头
   for (int i = 0; i < titles.length; i++) {
    Label excelTitle = new Label(i, 0, titles[i]);
    wsheet.addCell(excelTitle);
   }
   int c = 1; // 用于循环时Excel的行号
   Statement st = con.createStatement();
   String sql = "select * from user";
   ResultSet rs = st.executeQuery(sql); // 这个是从数据库中取得要导出的数据
   while (rs.next()) {
    
 wsheet.addCell(new Label(0, c, (String) rs.getString(2)));
wsheet.addCell(new Label(1, c, (String) rs.getString(3)));
wsheet.addCell(new Label(2, c, (String) rs.getString(4)));
wsheet.addCell(new Label(3, c, (String) rs.getString(12)));
wsheet.addCell(new Label(4, c, (String) rs.getString(7)));
wsheet.addCell(new Label(5, c, (String) rs.getString(8)));//qq
wsheet.addCell(new Label(7, c, (String) rs.getString(24)));
wsheet.addCell(new Label(8, c, (String) rs.getString(23)));
wsheet.addCell(new Label(9, c, (String) rs.getString(22)));//中信

    //如果还有的话,以此类推
    c++;
   }
    c=1; 
   String sql1 = "select * from driver";
   ResultSet rsd = st.executeQuery(sql1); // 这个是从数据库中取得要导出的数据
   while (rsd.next()) {
wsheet.addCell(new Label(6, c, (String) rsd.getString(15)));//保险  
wsheet.addCell(new Label(10, c, (String) rsd.getString(5)));//
wsheet.addCell(new Label(11, c, (String) rsd.getString(6)));//
wsheet.addCell(new Label(12, c, (String) rsd.getString(12)));//
wsheet.addCell(new Label(13, c, (String) rsd.getString(13)));//
   c++;
   }
   
   wbook.write();
   wbook.close();
   
   System.out.println("导出成功！");
   JOptionPane.showMessageDialog(this, "导出成功！路径：D:/会员信息总表"+y+m+d);
  }
  con.close();
}
catch(Exception e) {
 e.printStackTrace();
 JOptionPane.showMessageDialog(this,e+"请关闭后重试");
 }
    
  
 
    }
}
